//
//  TestListIndexViewController.h
//  MKUITestApp
//  使用listview来构建复杂的首页
//  Created by 苏尚进 on 2025/11/26.
//  Copyright © 2025 moon. All rights reserved.
//

#import "ListViewController.h"

NS_ASSUME_NONNULL_BEGIN

@interface TestListIndexViewController : ListViewController

@end

//顶部视图
@interface TestListIndex_HeadView : UIView
@property(nonatomic,strong,nullable) UIScrollView *scrollView;
@end
//含有多tab
@interface TestListIndex_TabCell : MKUIListViewSubViewBase<MKUIListCellViewProtocol,MKUITabBarControllerDelegate>
@property(nonatomic,strong) MKUITabBarController *tabController;
@property(nonatomic,strong) MKUITabBarItemFlowContainer *barContainer;
@property(nonatomic,strong) MKUITabBarContentContainerOneTabView *contentContainer;
@property(nonatomic,strong) MKUIFlowLayoutConstraint *flowlayout;
- (void)setBackgroundColorWithScrollOffsetPercent:(CGFloat)p;
- (void)onScrollViewDidScroll:(UIScrollView *)scrollView;
@end

//tab的容器
@protocol TestListIndex_TabListCellProtocol <NSObject>
@optional
- (void)tabListView:(MKUIListView *)listView willDisplayAtIndexPath:(NSIndexPath *)indexPath;
- (void)tabListView:(MKUIListView *)listView didEndDisplayingAtIndexPath:(NSIndexPath *)indexPath;
@end

@interface TestListIndex_TabListBase : MKUITabBarContentView
@property(nonatomic,strong) MKUIListView *listView;
@property(nonatomic,assign) BOOL fullScroll;
- (void)notifyReloadView;
- (void)notifyOutListViewScroll:(MKUIListView *)listView;
- (void)didDisplayRect:(CGRect)rect;
@end

@interface TestListIndex_TabList1 : TestListIndex_TabListBase
@property(nonatomic,strong,nullable) NSString *name;
- (id)initWithName:(NSString *)name;
@end

@interface TestListIndex_AutuRefreshSM : MKUIListViewSectionModel
@property(nonatomic,assign) BOOL stop;
@property(nonatomic,strong) NSTimer *autoRefrehSMTimer;
@property(nonatomic,copy,nullable) void(^whenChange)(TestListIndex_AutuRefreshSM *sm);
@property(nonatomic,strong,nullable) NSString *name;
- (id)initWithName:(NSString *)name;
- (void)initCells;
@end

@interface TestListIndex_CellButton : MKUIElementListViewCellButton<TestListIndex_TabListCellProtocol>

@end

NS_ASSUME_NONNULL_END
